package com.rd.sys.service.sys.user.impl;

import baseproj.common.exception.BaseServiceException;

/**
 * The Class UserInfoServiceException.
 */
public class UserPackageServiceException extends BaseServiceException {

    /** The Constant serialVersionUID. */
    private static final long serialVersionUID = 1L;

    public static final int SUBSCRIPTION_MAX_PROJECT = 1;
    public static final int SUBSCRIPTION_MAX_SCHEME = 2;
    public static final int SUBSCRIPTION_MAX_RESULT = 3;

    /**
     * Instantiates a new user info service exception.
     * 
     * @param erroCode
     *            the erro code
     */
    public UserPackageServiceException(int erroCode) {
        super(erroCode);

        if (erroCode == SUBSCRIPTION_MAX_PROJECT) {
            // 订购关系已达到最大项目个数
            this.setErroDesc("订购关系已达到最大项目个数");
        }
        if (erroCode == SUBSCRIPTION_MAX_SCHEME) {
            // 订购关系已达到最大方案个数
            this.setErroDesc("订购关系已达到最大方案个数");
        }
        if (erroCode == SUBSCRIPTION_MAX_RESULT) {
            // 订购关系已达到最大结果个数
            this.setErroDesc("订购关系已达到最大结果个数");
        }
    }
}
